package service.FleasMarketManagement;

import entity.FleasMarket;
import mapper.FleasMarketManagement.FleasMarketMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.LinkedHashMap;
import java.util.List;

@Service
public class FleasMarketService {

    @Autowired
    private FleasMarketMapper fleasMarketMapper;

    public List<LinkedHashMap<String, Object>> findFleasMarketItems() {
        return fleasMarketMapper.findFleasMarketItems();
    }

    public boolean issue_fleasMarket(FleasMarket fleasMarket) {
        return fleasMarketMapper.issue_fleasMarket(fleasMarket) == 1;
    }

    public int findItemsShopId(String userId, String time) {
        return fleasMarketMapper.findItemsShopId(userId, time);
    }

    public boolean updateFleasIcon(String icon,String shopId){
        return fleasMarketMapper.updateFleasIcon(icon,shopId) == 1;
    }
}
